﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Api.Model;
using System.Transactions;

namespace Api.DAL
{
    public class CategoryDAL : BaseDAL<Category>
    {
        public void DeleteAndAdd(int userId, int projectId, List<Category> list)
        {
            var categoryList = GetList(s => s.ProjectId == projectId && s.UserId == userId);
            DeleteList(categoryList);
            InsertAll(list);
        }
    }
}
